<?php
/*
 * @Author: 乔
 * @Date: 2021-10-21 13:59:12
 * @LastEditTime: 2021-10-28 09:17:48
 * @LastEditors: 乔
 * @FilePath: \tp30\app\index\model\User.php
 */

namespace app\index\model;

use think\Model;
use think\model\concern\SoftDelete;

class User extends Model
{
    use SoftDelete;
    // 软删除 字段名
    // protected $deleteTime = 'delete_time';
    // 软删除 字段默认值
    // protected $defaultSoftDelete =null;

    // protected $table = 'table_name';
    // protected $pk = 'id';


    public function setheadImgAttr($v)
    {
        return strtoupper($v);
    }
    public function setUnameAttr($v)
    {
        return strtoupper($v);
    }
    public function setSexAttr($v)
    {
        return $v == '男' ? 1 : 0;
    }
}
